<h2 style="background-color:#368EE0; color:white; font-size:20px; padding:5px;">Approved Transfer</h2>
<br>
<br>

<form method="post" action="<?php echo site_url();?>/product/transfer/transfer_approved/<?php echo $transfer->id;?>">

<table align="center">
<tr>
<td><strong>SOURCE BRANCH</strong></td>
<td><input type="text" readonly="readonly" value="<?php echo $transfer->source_branch_name?>"/> 
		
		</td>


<tr>
<td><strong>DESTINATION BRANCH<strong></td>
<td><input type="text" readonly="readonly" value="<?php echo $transfer->destination_branch_name?>" />
		</td>

       </tr>

<tr><td><strong>TRANSFER ID</strong>
<td><input type="text"  readonly="readonly" value="<?php echo $transfer->transfer_no;?>" /></td></tr>
</tr>  
<tr>      
<td><strong> DATE:</strong></td>
<td><input type="text"readonly="readonly"value="<?php echo $transfer->date;?>"/></td></td>
</tr>
</table>

<hr>
<hr>
<div class="row-fluid">





<div class="span12 pad_all">

<table width="100%" class="table table-bordered" >
  <tr class="info">
               <td><b>Item Name</b></td>
               <td><b>Item Code</b></td>
			  <td><b>Required Quantity</b></td> 
			   <td><b>Available Quantity</b></td>
			   <td><b> Quantity Transferd</b></td>
              
             </tr>
			
 <tbody id="p_scents"> <?php $count=1;?>    
<?php foreach ($transfer_product as $product){?>
  <tr >
  <?php $p_name=$this->transfer_model->get_product_name($product->id_product)->row();?>
  <label for="p_scnts">
    <td style="border:none;"><input type="text" class="span12" readonly="readonly" name='item_name[]' id="item_name"  value="<?php echo $p_name->name;?>" /><div   style="height: 200px; width:380px; cursor:pointer; overflow-y: scroll; word-wrap: normal; display:none " id="product_list"></div></td>
	<input type="hidden" value="<?php echo $product->id_product;?>" name="product_id[]"/>
	<input type="hidden" value="<?php echo $product->id;?>" name="transfer_product[]"/>
    <td style="border:none;"><input type="text" class="span12" readonly="readonly" value="<?php echo $product->product_code;?>"name="item_code[]" id="item_code"  /></td>
	 <td style="border:none;"><input type="text" readonly="radonly" class="span12" value="<?php echo $product->quantity;?>" id="required_quantity"  name='required_quantity[]'/></td>
  	<?php $data1=$this->transfer_model->get_avail_qty($product->id_product,$transfer->destination_branch)->row();?>
	  <td style="border:none;"><input type="text" readonly="readonly"class="span12"  id="available_quantity" value="<?php echo $data1->opening_stock;?>"  name="available_quantity[]"/></td>
	  <?php if ($data1->opening_stock==0)
	  {?>
	   <td style="border:none;"><input type="text" class="span12" readonly="readonly" id="transfer_quantity"  name="transfer_quantity[]"/></td>
	 
     <?php } else {?>
	  <td style="border:none;"><input  type="text" class="span12"  id="transfer_quantity"  name="transfer_quantity[]"/></td>
	    <?php $count=$count+1;?>
	  <?php } ?>
 </label> </tr>
<?php } ?>
<input type="hidden" value="<?php echo $count;?>" name="count_all" id="count_all"/> 
  </tbody>
</table>
<br>
<br>
<p align="right">
<input type="submit" value="update" class="btn btn-info"/></p></form>

</div>
</div>

<script>


$(document).ready(function(){
	$('#date').datepicker({ dateFormat: 'yy-mm-dd' });
	
	
})

</script>